package com.chezhe.letter.jasypt;

import com.chezhe.letter.jasypt.JasyptTestDO;
import com.chezhe.letter.jasypt.JasyptTestMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("/jasypt/test")
public class JasyptTestController {
    @Resource
    private JasyptTestMapper jasyptTestMapper;

    @GetMapping("/save")
    public String save() {
        JasyptTestDO jasyptTestDO = new JasyptTestDO();
        jasyptTestDO.setAge(1);
        jasyptTestDO.setId(1);
        jasyptTestMapper.insert(jasyptTestDO);
        return "success";
    }
}